﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SAM.Framework.Repository.Entities
{
    /// <summary>
    /// defines interface for base entity type, all entities in the system must implement this interface.
    /// </summary>
    /// <typeparam name="TPrimaryKey">Type of primarye key of the entity </typeparam>
    public interface IEntity<TPrimaryKey>
    {
        /// <summary>
        /// Unique identifier for this entity
        /// </summary>
        TPrimaryKey Id { get; set; }

        /// <summary>
        /// 实体记录是否已存在
        /// </summary>
        /// <returns></returns>
        bool IsTransient();
    }
}
